
cmake_minimum_required(VERSION 3.0.0)

project(demo)

# set(CMAKE_C_STANDARD 99)
# set(CMAKE_CXX_STANDARD 11)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -std=c99")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -std=c++11")

set(BUILD_SHARED_LIBS ON)

# set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
# set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
# set(CMAKE_INSTALL_PREFIX install)

set(BUILD_Version_123 123456)

configure_file(config.h.in ${PROJECT_SOURCE_DIR}/inc/config.h)

add_definitions(-DDEBUG)

include_directories(${PROJECT_SOURCE_DIR}/inc)

include(GNUInstallDirs)

add_subdirectory(${PROJECT_SOURCE_DIR}/src)

add_executable(demo main.c)

target_link_libraries(demo PRIVATE hello)

install(TARGETS demo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})